<div class="card border-info m-3">
    <h5 class="card-header bg-info text-white">修改</h5>
    <div class="card-body">
        <h5 class="card-title">基础信息</h5>
        <p class="card-text">请按内容提示，录入相关信息。</p>
        <div class="row mb-3">
            <div class="col-6">
                <ng-select [items]="extend.domain.serShareType.items"
                           [multiple]="false" [closeOnSelect]="true"
                           [searchable]="true"
                           bindLabel="name" bindValue="id"
                           placeholder="{{extend.domain.serShareType.nickname}}"
                           tooltip="{{extend.domain.serShareType.nickname}}"
                           [(ngModel)]="domain.serShareType">
                </ng-select>
            </div>
            <div class="col-6">
                <ng-select [items]="extend.domain.fkUUID.items" [multiple]="false" [closeOnSelect]="true"
                           [searchable]="true" [markFirst]="true"
                           bindLabel="name" bindValue="id" placeholder="{{extend.domain.fkUUID.nickname}}"
                           tooltip="{{extend.domain.fkUUID.nickname}}"
                           [(ngModel)]="domain.fkUUID"
                           [disabled]="true">
                </ng-select>
            </div>
        </div>
        <div class="row mb-3">
            <div class="col-6">
                <div class="input-group">
                    <div class="input-group-prepend w-25">
                        <button class="btn btn-info border-info w-100" type="button">分享名称</button>
                    </div>
                    <input type="text" class="form-control border-info" [(ngModel)]="domain.serShareName">
                </div>
                <span class="badge badge-danger" *ngIf="errRes.error?.detail['ConShareManage.serNum'] !== null">{{errRes.error?.detail['ConShareManage.serNum']}}</span>
            </div>
            <div class="col-6">
                <div class="input-group">
                    <div class="input-group-prepend w-25">
                        <button class="btn btn-info border-info w-100" type="button">分享标题</button>
                    </div>
                    <input type="text" class="form-control border-info" [(ngModel)]="domain.serTitle">
                </div>
            </div>
        </div>
        <div class="row mb-3">
            <div class="col-6">
                <input type="hidden" class="form-control border-info" [readonly]="true"
                       [(ngModel)]="domain.serAudit">
                <div class="input-group">
                    <div class="input-group-prepend w-25">
                        <button class="btn btn-info border-info w-100" type="button">审核状态</button>
                    </div>
                    <input type="text" class="form-control border-info" [readonly]="true"
                           [value]="extend.domain.serAudit.nickname">
                </div>
                <span class="badge badge-danger" *ngIf="errRes?.error?.detail['ConShareManage.serAudit'] !== null">{{errRes?.error?.detail['ConShareManage.serAudit']}}</span>
            </div>
        </div>
        <div class="row mb-3">
            <div class="col-6">
                <ng-container aria-label="ossUpload">
                    <div class="text-center mb-2"
                         *ngIf="domain.serFileUrl !== null && domain.serFileUrl !== undefined && domain.serFileUrl.length > 0">
                        <img [src]="domain.serFileUrl" style="height: 15rem;">
                        <p><span class="badge badge-success">{{domain.serFileUrl}}</span></p>
                    </div>
                    <input #file class="displayNone" type="file" ng2FileSelect
                           [uploader]="extend.domain.file.oss.uploader"
                           (change)="extend.domain.file.change($event)"/>
                </ng-container>
                <div class="input-group">
                    <div class="input-group-prepend w-25">
                        <button class="btn btn-info border-info w-100" type="button">图片上传</button>
                    </div>
                    <div class="input-group-append w-75">
                        <button class="btn btn-default border-info w-100" type="button" (click)="file.click()">选择
                        </button>
                    </div>
                </div>
                <span class="badge badge-danger" *ngIf="errRes.error?.detail['ConShareManage.serFileUrl'] !== null">{{errRes.error?.detail['ConShareManage.serFileUrl']}}</span>
            </div>
        </div>
        <div class="row mb-3">
            <div class="col-12">
                <div [froalaEditor]='froalaEditorOptions' [(froalaModel)]="domain.serEditorContent">Hello, Froala!</div>
            </div>
        </div>

        <div class="text-center mt-5">
            <button type="button" class="btn btn-outline-primary" (click)="func.update.req($event)">修改</button>
        </div>
    </div>
</div>

<span class="badge badge-info mr-3" *ngIf="errRes?.error?.timestamp !== null">response time: {{errRes?.error?.timestamp}}</span>

<div *ngIf="false">
    <p>{{errRes?.error}}</p>
    <p>{{errRes?.error?.code}}</p>
    <p>{{errRes?.error?.description}}</p>
    <p>{{errRes?.error?.theme}}</p>
    <p>{{errRes?.error?.timestamp}}</p>
    <p>{{errRes?.error?.detail?.RR?.duration}}</p>
    <p>{{errRes?.error?.detail['ConShareManage.serNum']}}</p>
    <p>{{errRes?.error?.detail['ConShareManage.serAudit']}}</p>
    <p>{{errRes?.error?.detail['ConShareManage.serValid']}}</p>
    <p>{{errRes?.error?.detail['ConShareManage.serValid2']}}</p>
    <p>{{errRes?.headers}}</p>
    <p>{{errRes?.message}}</p>
    <p>{{errRes?.name}}</p>
    <p>{{errRes?.ok}}</p>
    <p>{{errRes?.status}}</p>
    <p>{{errRes?.statusText}}</p>
    <p>{{errRes?.url}}</p>
</div>
